import React, { useState, useEffect } from 'react';
import styles from './index.less';

import { Button } from 'antd';
import { useAuth0 } from '@auth0/auth0-react';

export default function() {
  const { loginWithRedirect, isAuthenticated, user, isLoading } = useAuth0();

  useEffect(() => {
    setTimeout(() => {
      console.log(isAuthenticated);
      console.log(user);
    }, 4000);
  }, []);

  if (isLoading) {
    return <div>加载中...</div>;
  }

  return <div>Auth0 登录成功后的回跳页面</div>;
}
